﻿@model IEnumerable<GsifWeb4.ViewModels.MatchStatPerson>
                        
<td align="center">
		<table width="95%" border="0">
                        <tr>
                            @{
                            var players = Model.Where(stat => stat.Position > (int)ViewData["minPosition"] && stat.Position < (int)ViewData["maxPosition"]);

                           if (players != null && players.Count() > 0)
                           {
                               int percentEach = Convert.ToInt32(100 / players.Count());
                               for (int i = 0; i < players.Count(); i++)
                               {
                                    <td width="@percentEach"></td>  
                                }
                           }
                           else
                           {
                                    <td width='100%'></td>  
                          }
                          } 
                        </tr>
                        <tr>
                            @{
                            foreach (var player in players) 
                            { 
                                <td align='center' colspan= '1'>
					                @{Html.RenderPartial("_MatchReportPlayer", player);} 
				                </td>
                            }
                            }
                        </tr>
            </table>
</td>